--TEST--
bool MySQLndUhConnection::queryReadResultsetHeader(resource $connection, resource $statement)
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
	require_once('config.inc');

	class proxy extends MySQLndUhConnection {
		public function queryReadResultsetHeader($res, $stmt) {
			printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
			var_dump($ret = parent::queryReadResultsetHeader($res, $stmt));
			return $ret;
		}
	}

	class proxy2 extends MySQLndUhConnection {
		public function queryReadResultsetHeader($res, $stmt) {
			return $res;
		}
	}

	class proxy3 extends MySQLndUhConnection {
		public function queryReadResultsetHeader($res, $stmt) {
			return $res;
		}
	}

	class proxy4 extends MySQLndUhConnection {
		public function queryReadResultsetHeader($res, $stmt) {
			printf("%s(%s)\n", __METHOD__, var_export(func_get_args(), true));
			var_dump($ret = parent::queryReadResultsetHeader($res, $stmt));
			return $ret;
		}
	}

	$conn = mysqlnd_uh_test\connect::mysqli();
	mysqlnd_uh_test\query_test::mysqli($conn);

	mysqlnd_uh_set_connection_proxy(new proxy());
	mysqlnd_uh_test\query_test::mysqli($conn);

	mysqlnd_uh_set_connection_proxy(new proxy2());
	mysqlnd_uh_test\query_test::mysqli($conn);

	$conn = mysqlnd_uh_test\connect::mysqli();
	mysqlnd_uh_set_connection_proxy(new proxy3());
	mysqlnd_uh_test\query_test::mysqli($conn);

	printf("proxy4 and statement\n");
	mysqlnd_uh_set_connection_proxy(new proxy4());
	$conn = mysqlnd_uh_test\connect::mysqli();
	$stmt = mysqli_stmt_init($conn);
	$stmt->prepare("SELECT 1");
	$stmt->execute();
	$col1 = NULL;
	$stmt->bind_result($col1);
	while ($stmt->fetch())
		var_dump($col1);
	$stmt->close();

	print "done!";
?>
--EXPECTF--
proxy::queryReadResultsetHeader(array (
  0 => NULL,
  1 => NULL,
))
bool(true)

Warning: MySQLndUhConnection::query(): (MySQLnd User Handler) The method MySQLndUhConnection::queryReadResultsetHeader() did not return a boolean value as it should in %s on line %d

Warning: mysqli::query(): (00000/0):  in %s on line %d
[000]  - query execution failed

Warning: MySQLndUhConnection::query(): (MySQLnd User Handler) The method MySQLndUhConnection::queryReadResultsetHeader() did not return a boolean value as it should in %s on line %d

Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in %s on line %d
[000]  - fetch failed
proxy4 and statement
int(1)
done!